 /*
  @name:
  @description: todo 只扣了一部分代码
  @require:
  @date: 2016/5/12
  @author: 邹志强(tza17313@qq.com)
  */
 function E_JSON() {
     return typeof JSON != "object" && (JSON = {}),
         function() {
             "use strict";

             function f(e) {
                 return e < 10 ? "0" + e : e;
             }

             function quote(e) {
                 return escapable.lastIndex = 0,
                     escapable.test(e) ? '"' + e.replace(escapable, function(e) {
                         var t = meta[e];
                         return typeof t == "string" ? t : "\\u" + ("0000" + e.charCodeAt(0).toString(16)).slice(-4);
                     }) + '"' : '"' + e + '"';
             }

             function str(e, t) {
                 var n, r, i, s, o = gap,
                     u, a = t[e];
                 a && typeof a == "object" && typeof a.toJSON == "function" && (a = a.toJSON(e)),
                     typeof rep == "function" && (a = rep.call(t, e, a));
                 switch (typeof a) {
                     case "string":
                         return quote(a);
                     case "number":
                         return isFinite(a) ? String(a) : "null";
                     case "boolean":
                     case "null":
                         return String(a);
                     case "object":
                         if (!a)
                             return "null";
                         gap += indent,
                             u = [];
                         if (Object.prototype.toString.apply(a) === "[object Array]") {
                             s = a.length;
                             for (n = 0; n < s; n += 1)
                                 u[n] = str(n, a) || "null";
                             return i = u.length === 0 ? "[]" : gap ? "[\n" + gap + u.join(",\n" + gap) + "\n" + o + "]" : "[" + u.join(",") + "]",
                                 gap = o,
                                 i;
                         }
                         if (rep && typeof rep == "object") {
                             s = rep.length;
                             for (n = 0; n < s; n += 1)
                                 typeof rep[n] == "string" && (r = rep[n],
                                     i = str(r, a),
                                     i && u.push(quote(r) + (gap ? ": " : ":") + i));
                         } else
                             for (r in a)
                                 Object.prototype.hasOwnProperty.call(a, r) && (i = str(r, a),
                                     i && u.push(quote(r) + (gap ? ": " : ":") + i));
                         return i = u.length === 0 ? "{}" : gap ? "{\n" + gap + u.join(",\n" + gap) + "\n" + o + "}" : "{" + u.join(",") + "}",
                             gap = o,
                             i;
                 }
             }
             typeof Date.prototype.toJSON != "function" && (Date.prototype.toJSON = function(e) {
                     return isFinite(this.valueOf()) ? this.getUTCFullYear() + "-" + f(this.getUTCMonth() + 1) + "-" + f(this.getUTCDate()) + "T" + f(this.getUTCHours()) + ":" + f(this.getUTCMinutes()) + ":" + f(this.getUTCSeconds()) + "Z" : null;
                 },
                 String.prototype.toJSON = Number.prototype.toJSON = Boolean.prototype.toJSON = function(e) {
                     return this.valueOf();
                 }
             );
             var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
                 escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
                 gap, indent, meta = {
                     "\b": "\\b",
                     "  ": "\\t",
                     "\n": "\\n",
                     "\f": "\\f",
                     "\r": "\\r",
                     '"': '\\"',
                     "\\": "\\\\"
                 },
                 rep;
             JSON.stringify2 = function(e, t, n) {
                     var r;
                     gap = "",
                         indent = "";
                     if (typeof n == "number")
                         for (r = 0; r < n; r += 1)
                             indent += " ";
                     else
                         typeof n == "string" && (indent = n);
                     rep = t;
                     if (!t || typeof t == "function" || typeof t == "object" && typeof t.length == "number")
                         return str("", {
                             "": e
                         });
                     throw new Error("JSON.stringify");
                 },
                 typeof JSON.parse != "function" && (JSON.parse = function(text, reviver) {
                     function walk(e, t) {
                         var n, r, i = e[t];
                         if (i && typeof i == "object")
                             for (n in i)
                                 Object.prototype.hasOwnProperty.call(i, n) && (r = walk(i, n),
                                     r !== undefined ? i[n] = r : delete i[n]);
                         return reviver.call(e, t, i);
                     }
                     var j;
                     text = String(text),
                         cx.lastIndex = 0,
                         cx.test(text) && (text = text.replace(cx, function(e) {
                             return "\\u" + ("0000" + e.charCodeAt(0).toString(16)).slice(-4);
                         }));
                     if (/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, "")))
                         return j = eval("(" + text + ")"),
                             typeof reviver == "function" ? walk({
                                 "": j
                             }, "") : j;
                     throw new SyntaxError("JSON.parse");
                 });
         }(),
         JSON;
 }

 function E_store() {
     var r = +(new Date),
         i = E_JSON(),
         s = {},
         o = window.document,
         u = "localStorage",
         a = "__storejs__",
         f;
     s.disabled = !1,
         s.set = function(e, t) {},
         s.get = function(e) {},
         s.remove = function(e) {},
         s.clear = function() {},
         s.transact = function(e, t, n) {
             var r = s.get(e);
             n == null && (n = t,
                     t = null),
                 typeof r == "undefined" && (r = t || {}),
                 n(r),
                 s.set(e, r);
         },
         s.getAll = function() {},
         s.serialize = function(e) {
             return i.stringify2(e);
         },
         s.deserialize = function(e) {
             if (typeof e != "string")
                 return undefined;
             try {
                 return i.parse(e);
             } catch (t) {
                 return e || undefined;
             }
         };

     function l() {
         try {
             return u in window && window[u];
         } catch (e) {
             return !1;
         }
     }
     if (l())
         f = window[u],
         s.set = function(e, t) {
             if (t === undefined)
                 return s.remove(e);
             try {
                 f.setItem(e, s.serialize(t));
             } catch (n) {
                 f.clear(),
                     f.setItem(e, s.serialize(t));
             }
             return t;
         },
         s.get = function(e) {
             return s.deserialize(f.getItem(e));
         },
         s.remove = function(e) {
             f.removeItem(e);
         },
         s.clear = function() {
             f.clear();
         },
         s.getAll = function() {
             var e = {};
             for (var t = 0; t < f.length; ++t) {
                 var n = f.key(t);
                 e[n] = s.get(n);
             }
             return e;
         };
     else if (o.documentElement.addBehavior) {
         var c, h;
         try {
             h = new ActiveXObject("htmlfile"),
                 h.open(),
                 h.write('<script>document.w=window</script><iframe src="/favicon.ico"></iframe>'),
                 h.close(),
                 c = h.w.frames[0].document,
                 f = c.createElement("div");
         } catch (p) {
             f = o.createElement("div"),
                 c = o.body;
         }

         function d(e) {
             return function() {
                 var t = Array.prototype.slice.call(arguments, 0);
                 t.unshift(f),
                     c.appendChild(f),
                     f.addBehavior("#default#userData"),
                     f.load(u);
                 var n = e.apply(s, t);
                 return c.removeChild(f),
                     n;
             };
         }
         var v = new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]", "g");

         function m(e) {
             return e.replace(v, "___");
         }
         s.set = d(function(e, t, n) {
                 return t = m(t),
                     n === undefined ? s.remove(t) : (e.setAttribute(t, s.serialize(n)),
                         e.save(u),
                         n);
             }),
             s.get = d(function(e, t) {
                 return t = m(t),
                     s.deserialize(e.getAttribute(t));
             }),
             s.remove = d(function(e, t) {
                 t = m(t),
                     e.removeAttribute(t),
                     e.save(u);
             }),
             s.clear = d(function(e) {
                 var t = e.XMLDocument.documentElement.attributes;
                 e.load(u);
                 for (var n = 0, r; r = t[n]; n++)
                     e.removeAttribute(r.name);
                 e.save(u);
             }),
             s.getAll = d(function(e) {
                 var t = e.XMLDocument.documentElement.attributes,
                     n = {};
                 for (var r = 0, i; i = t[r]; ++r) {
                     var o = m(i.name);
                     n[i.name] = s.deserialize(e.getAttribute(o));
                 }
                 return n;
             });
     }
     try {
         s.set(a, a),
             s.get(a) != a && (s.disabled = !0),
             s.remove(a);
     } catch (p) {
         s.disabled = !0;
     }
     s.enabled = !s.disabled;
     return s;
 }

 function E_colorPicker() {
     var e;
     return function(t, o, i) {
             function s(e) {
                 if (t.event && t.event.contentOverflow !== i)
                     return {
                         x: t.event.offsetX,
                         y: t.event.offsetY
                     };
                 if (e.offsetX !== i && e.offsetY !== i)
                     return {
                         x: e.offsetX,
                         y: e.offsetY
                     };
                 var o = e.target.parentNode.parentNode;
                 return {
                     x: e.layerX - o.offsetLeft,
                     y: e.layerY - o.offsetTop
                 };
             }

             function r(t, e, i) {
                 t = o.createElementNS(y, t);
                 for (var s in e)
                     t.setAttribute(s, e[s]);
                 "[object Array]" != Object.prototype.toString.call(i) && (i = [i]);
                 for (var r = 0, n = i[0] && i.length || 0; n > r; r++)
                     t.appendChild(i[r]);
                 return t;
             }

             function n(t) {
                 var e, o, i, s, r, n = t.h % 360 / 60;
                 r = t.v * t.s,
                     s = r * (1 - Math.abs(n % 2 - 1)),
                     e = o = i = t.v - r,
                     n = ~~n,
                     e += [r, s, 0, 0, s, r][n],
                     o += [s, r, r, s, 0, 0][n],
                     i += [0, 0, s, r, r, s][n];
                 var l = Math.floor(255 * e),
                     a = Math.floor(255 * o),
                     c = Math.floor(255 * i);
                 return {
                     r: l,
                     g: a,
                     b: c,
                     hex: "#" + (16777216 | c | a << 8 | l << 16).toString(16).slice(1)
                 };
             }

             function l(t) {
                 var e = t.r,
                     o = t.g,
                     i = t.b;
                 (t.r > 1 || t.g > 1 || t.b > 1) && (e /= 255,
                     o /= 255,
                     i /= 255);
                 var s, r, n, l;
                 return n = Math.max(e, o, i),
                     l = n - Math.min(e, o, i),
                     s = 0 == l ? null : n == e ? (o - i) / l + (i > o ? 6 : 0) : n == o ? (i - e) / l + 2 : (e - o) / l + 4,
                     s = s % 6 * 60,
                     r = 0 == l ? 0 : l / n, {
                         h: s,
                         s: r,
                         v: n
                     };
             }

             function a(e, o, r) {
                 return function(l) {
                     l = l || t.event;
                     var a = s(l);
                     e.h = a.y / o.offsetHeight * 360 + g;
                     var c = n({
                             h: e.h,
                             s: 1,
                             v: 1
                         }),
                         f = n({
                             h: e.h,
                             s: e.s,
                             v: e.v
                         });
                     return r.style.backgroundColor = c.hex,
                         e.callback && e.callback(f.hex, {
                             h: e.h - g,
                             s: e.s,
                             v: e.v
                         }, {
                             r: f.r,
                             g: f.g,
                             b: f.b
                         }, i, a),
                         l.stopPropagation ? (l.stopPropagation(),
                             l.preventDefault()) : l.cancelBubble = !0, !1;
                 };
             }

             function c(e, o) {
                 return function(i) {
                     i = i || t.event;
                     var r = s(i),
                         l = o.offsetWidth,
                         a = o.offsetHeight;
                     e.s = r.x / l,
                         e.v = (a - r.y) / a;
                     var c = n(e);
                     return e.callback && e.callback(c.hex, {
                             h: e.h - g,
                             s: e.s,
                             v: e.v
                         }, {
                             r: c.r,
                             g: c.g,
                             b: c.b
                         }, r),
                         i.stopPropagation ? (i.stopPropagation(),
                             i.preventDefault()) : i.cancelBubble = !0, !1;
                 };
             }

             function f(t, e, o) {
                 t.attachEvent ? t.attachEvent("on" + e, o) : t.addEventListener && t.addEventListener(e, o, !1);
             }

             function p(t, e, o) {
                 var i = !1;
                 f(e, "mousedown", function() {
                         i = !0;
                     }),
                     f(e, "mouseup", function() {
                         i = !1;
                     }),
                     f(e, "mouseout", function() {
                         i = !1;
                     }),
                     f(e, "mousemove", function(t) {
                         i && o(t);
                     });
             }

             function h(t, e, o, i) {
                 t.h = e.h % 360,
                     t.s = e.s,
                     t.v = e.v;
                 var s = n(t),
                     r = {
                         y: t.h * t.slideElement.offsetHeight / 360,
                         x: 0
                     },
                     l = t.pickerElement.offsetHeight,
                     a = {
                         x: t.s * t.pickerElement.offsetWidth,
                         y: l - t.v * l
                     };
                 return t.pickerElement.style.backgroundColor = n({
                         h: t.h,
                         s: 1,
                         v: 1
                     }).hex,
                     t.callback && t.callback(i || s.hex, {
                         h: t.h,
                         s: t.s,
                         v: t.v
                     }, o || {
                         r: s.r,
                         g: s.g,
                         b: s.b
                     }, a, r),
                     t;
             }
             var d, v, u = t.SVGAngle || o.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") ? "SVG" : "VML",
                 g = 15,
                 y = "http://www.w3.org/2000/svg",
                 m = ['<div class="picker-wrapper">', '<div class="picker"></div>', '<div class="picker-indicator"></div>', "</div>", '<div class="slide-wrapper">', '<div class="slide"></div>', '<div class="slide-indicator"></div>', "</div>"].join("");
             "SVG" == u ? (v = r("svg", {
                     xmlns: "http://www.w3.org/2000/svg",
                     version: "1.1",
                     width: "100%",
                     height: "100%"
                 }, [r("defs", {}, r("linearGradient", {
                     id: "gradient-hsv",
                     x1: "0%",
                     y1: "100%",
                     x2: "0%",
                     y2: "0%"
                 }, [r("stop", {
                     offset: "0%",
                     "stop-color": "#FF0000",
                     "stop-opacity": "1"
                 }), r("stop", {
                     offset: "13%",
                     "stop-color": "#FF00FF",
                     "stop-opacity": "1"
                 }), r("stop", {
                     offset: "25%",
                     "stop-color": "#8000FF",
                     "stop-opacity": "1"
                 }), r("stop", {
                     offset: "38%",
                     "stop-color": "#0040FF",
                     "stop-opacity": "1"
                 }), r("stop", {
                     offset: "50%",
                     "stop-color": "#00FFFF",
                     "stop-opacity": "1"
                 }), r("stop", {
                     offset: "63%",
                     "stop-color": "#00FF40",
                     "stop-opacity": "1"
                 }), r("stop", {
                     offset: "75%",
                     "stop-color": "#0BED00",
                     "stop-opacity": "1"
                 }), r("stop", {
                     offset: "88%",
                     "stop-color": "#FFFF00",
                     "stop-opacity": "1"
                 }), r("stop", {
                     offset: "100%",
                     "stop-color": "#FF0000",
                     "stop-opacity": "1"
                 })])), r("rect", {
                     x: "0",
                     y: "0",
                     width: "100%",
                     height: "100%",
                     fill: "url(#gradient-hsv)"
                 })]),
                 d = r("svg", {
                     xmlns: "http://www.w3.org/2000/svg",
                     version: "1.1",
                     width: "100%",
                     height: "100%"
                 }, [r("defs", {}, [r("linearGradient", {
                     id: "gradient-black",
                     x1: "0%",
                     y1: "100%",
                     x2: "0%",
                     y2: "0%"
                 }, [r("stop", {
                     offset: "0%",
                     "stop-color": "#000000",
                     "stop-opacity": "1"
                 }), r("stop", {
                     offset: "100%",
                     "stop-color": "#CC9A81",
                     "stop-opacity": "0"
                 })]), r("linearGradient", {
                     id: "gradient-white",
                     x1: "0%",
                     y1: "100%",
                     x2: "100%",
                     y2: "100%"
                 }, [r("stop", {
                     offset: "0%",
                     "stop-color": "#FFFFFF",
                     "stop-opacity": "1"
                 }), r("stop", {
                     offset: "100%",
                     "stop-color": "#CC9A81",
                     "stop-opacity": "0"
                 })])]), r("rect", {
                     x: "0",
                     y: "0",
                     width: "100%",
                     height: "100%",
                     fill: "url(#gradient-white)"
                 }), r("rect", {
                     x: "0",
                     y: "0",
                     width: "100%",
                     height: "100%",
                     fill: "url(#gradient-black)"
                 })])) : "VML" == u && (v = ['<DIV style="position: relative; width: 100%; height: 100%">', '<v:rect style="position: absolute; top: 0; left: 0; width: 100%; height: 100%" stroked="f" filled="t">', '<v:fill type="gradient" method="none" angle="0" color="red" color2="red" colors="8519f fuchsia;.25 #8000ff;24903f #0040ff;.5 aqua;41287f #00ff40;.75 #0bed00;57671f yellow"></v:fill>', "</v:rect>", "</DIV>"].join(""),
                 d = ['<DIV style="position: relative; width: 100%; height: 100%">', '<v:rect style="position: absolute; left: -1px; top: -1px; width: 101%; height: 101%" stroked="f" filled="t">', '<v:fill type="gradient" method="none" angle="270" color="#FFFFFF" opacity="100%" color2="#CC9A81" o:opacity2="0%"></v:fill>', "</v:rect>", '<v:rect style="position: absolute; left: 0px; top: 0px; width: 100%; height: 101%" stroked="f" filled="t">', '<v:fill type="gradient" method="none" angle="0" color="#000000" opacity="100%" color2="#CC9A81" o:opacity2="0%"></v:fill>', "</v:rect>", "</DIV>"].join(""),
                 o.namespaces.v || o.namespaces.add("v", "urn:schemas-microsoft-com:vml", "#default#VML"));
             var b = 0;
             e = function(t, o, i) {
                     if (!(this instanceof e))
                         return new e(t, o, i);
                     if (this.h = 0,
                         this.s = 1,
                         this.v = 1,
                         i)
                         this.callback = i,
                         this.pickerElement = o,
                         this.slideElement = t;
                     else {
                         var s = t;
                         s.innerHTML = m,
                             this.slideElement = s.getElementsByClassName("slide")[0],
                             this.pickerElement = s.getElementsByClassName("picker")[0];
                         var r = s.getElementsByClassName("slide-indicator")[0],
                             n = s.getElementsByClassName("picker-indicator")[0];
                         e.fixIndicators(r, n),
                             this.callback = function(t, i, s, l, a) {
                                 e.positionIndicators(r, n, a, l),
                                     o(t, i, s);
                             };
                     }
                     if ("SVG" == u) {
                         var l = v.cloneNode(!0),
                             h = d.cloneNode(!0),
                             g = l.getElementById("gradient-hsv"),
                             y = l.getElementsByTagName("rect")[0];
                         g.id = "gradient-hsv-" + b,
                             y.setAttribute("fill", "url(#" + g.id + ")");
                         var x = [h.getElementById("gradient-black"), h.getElementById("gradient-white")],
                             k = h.getElementsByTagName("rect");
                         x[0].id = "gradient-black-" + b,
                             x[1].id = "gradient-white-" + b,
                             k[0].setAttribute("fill", "url(#" + x[1].id + ")"),
                             k[1].setAttribute("fill", "url(#" + x[0].id + ")"),
                             this.slideElement.appendChild(l),
                             this.pickerElement.appendChild(h),
                             b++;
                     } else
                         this.slideElement.innerHTML = v,
                         this.pickerElement.innerHTML = d;
                     f(this.slideElement, "click", a(this, this.slideElement, this.pickerElement)),
                         f(this.pickerElement, "click", c(this, this.pickerElement)),
                         p(this, this.slideElement, a(this, this.slideElement, this.pickerElement)),
                         p(this, this.pickerElement, c(this, this.pickerElement));
                 },
                 e.hsv2rgb = function(t) {
                     var e = n(t);
                     return delete e.hex,
                         e;
                 },
                 e.hsv2hex = function(t) {
                     return n(t).hex;
                 },
                 e.rgb2hsv = l,
                 e.rgb2hex = function(t) {
                     return n(l(t)).hex;
                 },
                 e.hex2hsv = function(t) {
                     return l(e.hex2rgb(t));
                 },
                 e.hex2rgb = function(t) {
                     return {
                         r: parseInt(t.substr(1, 2), 16),
                         g: parseInt(t.substr(3, 2), 16),
                         b: parseInt(t.substr(5, 2), 16)
                     };
                 },
                 e.prototype.setHsv = function(t) {
                     return h(this, t);
                 },
                 e.prototype.setRgb = function(t) {
                     return h(this, l(t), t);
                 },
                 e.prototype.setHex = function(t) {
                     return h(this, e.hex2hsv(t), i, t);
                 },
                 e.positionIndicators = function(t, e, o, i) {
                     o && (t.style.top = o.y - t.offsetHeight / 2 + "px"),
                         i && (e.style.top = i.y - e.offsetHeight / 2 + "px",
                             e.style.left = i.x - e.offsetWidth / 2 + "px");
                 },
                 e.fixIndicators = function(t, e) {
                     e.style.pointerEvents = "none",
                         t.style.pointerEvents = "none";
                 };
         }(window, window.document),
         e;
 }